Fixed writing attributes namespace