[ExCvTh] bug fix + clean up