Fixed Mac and Linux compatiblity