Fix cursor loop in Filter