minor fixes in order to get QEMU to compile