generalize open modal window fix