Fix some bugs in the canonical example