fix bug in setting graph attributes

* fixes #84
* inc test