API tests + fix