fix snippet bug