fixed physMem segfault