Updated to ensure that scripts are set disabled in the database in the edge case that all scripts are found to be disabled.