Clang fixes

A couple fixes for compilation errors I found using clang.