Fixed bug that duplicated tokens