Fixed mac version with a small hack