fix saving snippet