various fixes to make clang happy