Fixed bug where response returned string instead of object