fix bug for mac os clang compiler