27-18-713. Decision of court. If upon application it satisfactorily appears that the writ of attachment was improperly or irregularly issued, it must be discharged. But the court or judge may allow the plaintiff to amend the plaintiff's affidavit or undertaking.