Adding check for headers