Fixed some minor errors in the tutorial code examples