Fixed issue where header was being printed too often.