Fix the bug on migrations