Proposing sample code fix for issue #764