Fixes bug where on button sent 0 and off button sent 1