fixed a bug in 'head' snippet