fix api usage in demo