Fix for migration errors