Fixed code snippets