Add memchr and some other fix