Various clang compilation errors fixed