a few small changes to work on mac os