namespace support and fixed auto config.unit bug