Fix remove rule for migrations

I write invalid code for remove rule. This pull request should fix this problem.