Fixed small bug in the formcontroller