Fix writes getting processing multiple times.
Merge pull request #50 from jdve/fix-multiple-writes

Multiple writes in succession results in multiple calls to same resource