Just gave it a try, and seems to work now! No more crash and the switches get turned on/off as they should as far as I can tell.