Fixes to sample code.