fixed a bunch of clang warnings