Bugfixes in controller implementation.