Fix issue with getPlatform function