Fixing popup issue