Latest Mac client fixes

Please merge these fixes so that the Mac client works!