Fixed NameError: name 'headers' is not defined.