Fix events in modal windows