Fixed compile bugs on Clang