fix tuple page javascript