fixed for clang and gcc build