IE modal dialog fix

Fixes issue with modal dialog in ie #399 #17 
This issue from from @TheGreatFuzz, I just created the pull request.