fix payload parsing