Made disabling more dynamic