fix panel hiding glitch