You made a mistake, but after some cursing...you realise it turned out genius. A pleasant surprise, amirite?

I like to think one of my higher powers is looking at me in pity...you poor, misguided fool :) ...and then deciding to help me out by transforming one of my mistakes into something amazing... Ever had this sort of experience?