bugfix for darwin