Fixed mac bug