typo in js function.