- Fixed several bugs in form controller