fix minor bug in snippet.class