fix issue #5
apply bug fix for #5 to snippets too