fixed api connection