fixed issue regarding global variable email