fix reduntant js code.