I commented out the bounce function so I can confirm what it is happening. You can read my hardware here and also why I use mode 2 not 1.