Fix panel show function