Fix some errors in code examples