modal ensures state on delayed open/close