Working version of controller fix