fixed bug in VirtualMachine::stop