fix namespace write handling