Fixed a bug at sha1 checking