add crc32 and fix bug