fixes #639
Merge pull request #693 from scopatz/headgaurd

fixes #639