First attempt at fixing api call errors

hmmm let see how we can test this