Small fix in restore check