Fix some API errors