fix panel close process