add guard for headers