Fixed bug with modal windows