[resolves #130] Prevent errors being thrown on VM shutdown