fix remove panel crash