FIxing a bug in patient search