Made modal window to work again