fix build for f18, plus minor fixes