fixing mac detection