Fixing UnboundLocalError: local variable ‘content’ referenced before ass...

...ignment