fixing up some issues with token