Fixed some errors in code examples