fixed issues with tokendeque