fixing bugs in moving vm