fixes for clang/gcc