fixed the snippets controller