bug fix: giving correct recveied data to finalization function