more fixes to example code