Changes to get things working on mac