Fix diff bugs when to_version wasn't the latest