fixed token parsing