Fixes for VM_TYPE emulator