Quick fix for an error occurred in strict mode

Fixed "SyntaxError: in strict mode code, functions may be declared only
at top level or immediately within another function"