Fixed error on first api call