Fixed to do versioning work before SaveChanges() is run internally