fixed - sometimes popup fails to open