Added a VM stop function