fix some clang compile errors