Misc. fixes for save states/mmap