Fixed vm state caching bug.