fixed token lookup bug