fix for keeping LED on after refresh of webpage