More bugfixes to controller