Fixed 2 issues found by clang