Fix weighted median zip-ordering bug