fixed a bug in search for lrs and redund