fix bug where it assumes headers payload is present