api call bug fixes