migration fix finalize