Fixed issues on the controller tests