fixed panel switch not redendering untill resize of frame.