finished VM tests and bug fixes