Attempted JS fixes