Fixed controller to correct working