Fix a couple of problems with a recent PR, a compile problem and missing ASF headers. This closes #77