Fix VM tests, minor bug