working issues in platform detection logic