fix clang 5 compiler errors