fixing bug in controller mixin