bugfix for local variable 'email' referenced before assignment