fix some memory warning