fixes for clang support