some fixes for controller