Fix bug in code snippets