Fixed an issue where get_mem_mmap would get stuck