fix bug when we step back til beginning but cannot find match