歪打正著

Idiom

 * 1) to have used the wrong method or have had no intention of doing something but arrive at the correct result nevertheless