Fix an ancient JS bug