fix bug with close popup