Fix buildBasePath