MMap bug fix