More fixes to example code