fixed the bug on Redo().