Some fixes for the example code in the doc.