fix up bugs in the examples