add delay when panel is closing