fixed bug in stringtotoken