C++ writer
Fixes for VMfix