fix update js method