Fixes to testing api