fixed to compile on clang