fix bug in create_new method in snippet.class