Fix bug on controller