fixed Uncaught ReferenceError