fix bug in pop-up