fix to use mmap