fixed condition in migration code (lack of perms)