a few more bug fixes for clang on mac upgrade