fix build for f18, plus minor fixes
Merge pull request #1 from NiceandGently/master

fix build for f18, plus minor fixes