Improved logic to remove log summary in agenda