On-second-thought Definition

adverb

(idiomatic) After reconsidering; on further consideration.

I originally thought that it was a good idea, but on second thought I'm not so sure.
Wiktionary