Added a 3rd condition for the migration error case