Fixed isOSX function