Doc has been modified or corrupted since signed(data)

This worked in production, I copied the db to a preprod environment now i get this error after processing this agent against selected docs. If I refresh the docs the error goes away. I ran fixup and resigned the db.

Sub Initialize

Dim s As New NotesSession

Dim ThisDB As NotesDatabase

Dim view1 As NotesView

Dim collection As NotesDocumentCollection 

Dim docA As NotesDocument 

Dim tdate As Integer 



Set ThisDB = s.CurrentDatabase

Set collection = thisDB.UnprocessedDocuments

’ Check to see if there are any documents to run a batch against

Set docA = collection.GetFirstDocument()

If docA Is Nothing Then

Msgbox “No documents to deduct …exiting.”

End

End If

’ Grab the batch number from the end user

UserInput = “”

UserInput = Inputbox$(“Please Enter the Bacth #”, “Batch Number Required”)

While (Not (docA Is Nothing))

tdate = Weekday(Today) ’ Get todays value in an integer between 1 and 7

Dim adate As New NotesDateTime(Today) ’ Set to todays date each round through

’ Set the deduction date depending on when they push the button

If tdate = 1 Then Call adate.AdjustDay(5)

If tdate = 2 Then Call adate.AdjustDay(11)

If tdate = 3 Then Call adate.AdjustDay(10)

If tdate = 4 Then Call adate.AdjustDay(9)

If tdate = 5 Then Call adate.AdjustDay(8)

If tdate = 6 Then Call adate.AdjustDay(7)

If tdate = 7 Then Call adate.AdjustDay(6)

docA.payroll_batch = UserInput

docA.status = “Deducted”

docA.apdate = Today

docA.savecheck = 1

Call docA.ReplaceItemValue(“deduction_date”,adate)

Call docA.Save(False,False)

Set docA = collection.getnextdocument(docA)

Wend 

End Sub