fix darwin bug