Fix another config bug and Mercury gen bug