fixed problemsn with the api