Please rework this sentence to remove all grammatical issues
Such models were set to ensure that there is no chance for an accident to occur, and if it did, be quickly resolved before it becomes a catastrophe.
Such models are set to ensure that there is no chance for an accident to occur and, if it does, it be quickly resolved before it becomes a catastrophe.