fixed a bug in simpletokenstream