Fixed "Uncaught ReferenceError: frame is not defined".