Added popup windows handling support