Fixed undo problem with PrepareContainer command