Fix local searching when multiple groups(Oleg). Need testing