fix null pointer exception for removed vm