test sha1 and fix bug