Fixed a few incorrect code in the example