Form bug fixes and improvements