fix mmap issue