fixes for VC14 and clang