Fixes API call issue