fix mac compilation bug