Fixed documentation errors

Some examples were incorrect.