fixed the bug of '\0' in the hash string