rearanging to ensure that close finishes animation