Some compile-time bugfixes after compiling with clang