remove bugs found by clang static analysis