Improve interface detection