fixed api loading