Fix bug for testing controller