Sometimes headers are not present.
Merge pull request #19 from wbyoung/master

Check for headers