Bugfix update

Hi,

I've fixed a bug in the caching of VM objects that was introduced in an earlier version.

BTW, are these changes going to be released on PyPi? If you no longer have time to maintain this, I'd be happy to take over.

Andy