Fixed more erros in controller.