fix bug in popup