Fix some bugs on the forms