more bug fixes to form