Fix attributes writer
Merge pull request #70 from chytreg/master

misleading implementation of attributes writer