Removed extra end statement that was breaking the controller