Fix small bugs in form