fixing double popup and empty text