Fixing issues with the API