Fix error in API example