It could have been a major disaster