fix 'ReferenceError: resp is not defined'