fix payload handling