Trouble with sending the correct values of checkbox field to another application

Hi,
I have a control form with checkbox filed that populates it checkboxes with database values. The values are usually just 1,2,3,… but sometimes some numbers might get repeated: 1,2,3,3,…

after the user has selected the numbers, they push ok button, then a custom button and they get directed to another app along with the checkbox field variable.
the problem is that only the first repeated number gets sent.

After some testing with var_dump() in onValidateSuccess event, I realized that i get the correct values if I press ok button twice.
I save my checkbox field in a global variable using the field settings, I also tried to save the variable in onvalidate event and in ajax event onBlur using [global_var] = {checkbox}, but no matter what, i can’t get both of the repeated numbers with only one push of ok button.