Fix display mode when opening panel