I realized something. I added a sound parameter to the buttons and accounted for it in the initial variables. But for some reason, I didn’t think that during the game I sometimes change those variables without considering this new addition. I guess the bugs are related to exactly that.