fixed compiler errors reported by clang