Bug fix to handle an empty API response.