Fixed a bug in the FindPrev implementation