Some small bug fix for qemu tests