fixed snakeHead and snakeTail