Fix bug with modal windows