Corrects API endpoint detection.