It is a blessing in disguise.

因祸得福。