fixing bug 4774 - ErrorException: Undefined variable: e (+typo correction)