Deprecation and basedir fix.