fixes to example code