Fixed NPE caused by vm not being in COS vmTable