fix broken js code.