Added token checking.