Fixed destruction of JVM

You don't handle the failure case.