JS popup fix