fix error on newer JavaScript engine.