Fixed bug where if you would do redo, rectangle ZOrder was wrong