fix 'js run before html element defined'