Fix token parsing