Fixed error with API connection.