Fixed API detection