minor vm bugfixing