Fixes to controller