fixed if statment bug -- now correctly check for darwin