Fix problem with popup response not recognized