Fix undefined local variable response when using server