Improve detection by interpolating and fix test case