update js for bugs