Added locking to VM's.