Minor improvements to vm