Fixed a possible "header already set" error