fix tests and dispatcher of cargo