Add an example, and fix the code.