fixes for restoring previous versions