remove unused function
Correctly find local components, fixed #5