Fix migration errors