bug fix in response hook undefined req