Some minor JS fixes