fixed some issues for clang