Fixed mem error in vm. Fixed logs tests