Correct grammar problems in the following text.
If the parties involved had integrity and knew that by cutting costs would result in many casualties, the engineering accident would have been prevented.
If the parties involved had integrity and knew that cutting costs would result in many casualties, the engineering accident would have been prevented.