redo template detection by rechecking location of cursor