fix typo in find_modes() function