Fix issues with dirty changed introduced by the last changes to cleanupDocument