fix createToken method with catalogue query