auto detect fixed for Darwin (OSX)