Fixed error in sample code in documentation

Beginners trip up on the sample code from the tutorial. Thought this might help.