fixed for unit tests and clang/gcc