Fix vm plugin

Fixes a bunch of errors I found while working on the avocado demo