Fix for: migrating to specific version leaves an open transaction at the end.