fixed some compile warnings on osx clang