fix: return correct buffer object for datastore responses

**Don't merge yet, there are no tests yet.**

This fixes #301.