Fixing bug with UserPermission model.