Fixed a minor bug in the controller
Merging my stuff