Fix platform code