Fix bug with centering popups