fix mm alloc issue