Fixed bug in panel_header method