Correct errors came from old version of example code