Fix early submit problem that made the popup disappear