fix attach problem due to form not being submitted