Changes for mac-compatibility

Small changes for mac compatibility.