Fix migration check