make addheaders a bit more sanitized