modified formhubDownload based on zmyao88's fix