Fixing a bug that occured when undoing a move with rectangularfigures