Fix for bsd/darwin/linux