Corsi Task - Woods et al - Incorrect count

Hi everyone!

I am using a Corsi task version that I’ve downloaded from Pavlovia. It’s based on the task adapted by Woods et. al. (2015, 2017). I am having a problem with the file because it is supposed to reduce the length of the sequence after two incorrect answers and to increase the length after one correct answer. Contrary to this, I’ve found that sometimes the sequence is being decreased only after 3 errors.
I’ve checked out the following code:

#If you got two wrong on that length, reduce length
if incorrectCountAtLength_3 == 2:
sequenceLength_3 = sequenceLength_3 - 1
incorrectCountAtLength_3 = 0

I tried changing the 2 for a 1 and it worked for a while… the length of the sequence correctly decreased after two following mistakes at first but… after that, it just needs one mistake to decrease the lenght again.

Any hint on how to solve this problem?

It would be very useful to have some help.

Thank you very much!