Fixed bug in deleting vm's