Corrected 2 small errors in the example code