Code snippets fixed