bugfixes in controller