Addressed errors in the example code