fix mac compilation error