Fix compiler errors introduced by clang