Bugfix writing error
Merge pull request #15 from wagnert/master

Bugfix writing error