fixes for clang 3.6