fix before update