Fix bug cannot get api