api connection fix