Fixed little bug in getCodeSnippet method