fixing clang compiler errors