bug fix center and closePopup