add animation for popup, bug fix