Fixed errors in API.