Fixed BC issue in TokenRepository