Panel switching fix