popups and bug fix