Fixed up reloads and resets after popup is opened