Fixed BML export bug

Fixed bug where a spacing reference was uninitialized
The attribute fixup is now separate from writing it