fix bug with popup

if you closed/opened a popup for the previous animation was finished it
did wonky things