Fixed an error that caused devices to never be able to be disabled.