fix some memory leak bugs