add fuzzer and fix exposed bugs