improved repairing version numbers