fix mac compatible