Fix closing popup