fixed undefined variable error in strict mode