fix data migration issues when migrating from really old databases