fixed issues in TokenController