fixed snippet bug