Fix problem on modal windows