Bugfixes on form application