Fixed bug where response object was assumed