Fixed some errors reported by Clang