fix namespace conflict bug in a reliable way