minor JS fixes