Small JS fixes