Fixed a bug in version restoration.