minor changes for darwin support