Fixed a bug where headers were being printed when they shouldn't have been.