Don't freeze when openning a modal view twice.

Right now when you open a popup twice, the whole UI freezes, this prevents opening it twice.