Fixed Mac and Linux compatibility