fix basePath and fix tests