fix missing var in js