Fixed destruction of JVM

Addressed review comment