fix some memory bitmap function bug