Fixed a problem in snippets handling that occurred when using string