Changes for mac compatibility

Minor changes to make stuff work on macs!