fix upgrade file