Code example fixes

I fixed some erroneous code examples