fix a issue in snippet