fix error when payload is not an object. Closes #14
3.1.0