Fixed NPE when disabling because of a failed db-connection