Fix local variable 'response' referenced before assignment #2053