Adding support for basePath.