fixing bug on undolastmovement