fixes to VM