I am trying to change one state but while doing that somehow my other state is also getting changed and I can\'t find the problem in this what should I do? here is my code :