include conditional before trying to set content of popup