fix position and slice

although they are not really needed when using tokens_with_position,
they should return correct results.