fix some vm and parser errors