fix tests of api