try a better fix to the component detection bug.