Fixed mac compatibility issue