fixed up some bugs with the form