Fix typo in API sample code