fixes for clang-analyzer