fix nested token bug