* fixed some issues found by the clang static analyzer