fixed minor bug with API cal