fixed issue with filtering a list with smaller max index then the current
index