Fixed controller to work even when minified