Adjusted things for mac compatibility