Button values in Quick replies not storing the right value to varaible

Hi @Pratik
I have assigned some numeric values to the quick reply buttons and saving the value to a variable. The value getting saved to the variable is sometime wrong or is saving a number which is 1 lesser than the assigned value or sometimes showing previous buttons value.
For eg: In the image(Ref images), I’m printing the variables to which the value was saved after the button press. For a button 2 val , i have assigned value as 2 but the value getting saved to the variable is 1 .


Please look into that and provide a solution. Thanks