more robust detection of components