Fix registering VM and some method calls