fix namespace change residual bugs