Adding a check to ensure that to be pulled headers are in buffer