Fixed response is not defined bug