get_header more robust functionality