Some fixes to make Clang happy