Fix hazards not deleting properly and existing hazards being added twice