Some fixes in the example code