[FIX] adding namespace declaration on wrong level after insert