fixed the bad api call issue