Fix platform checking