fix errors reported by clang