some improvements to bus detection