Fix some VM operation errors