fix sdk detection logic