Minor change to apply the close and className properties sooner.