minor change
fix bugs detected by clang-analyzer