Minor bug fix to filtering.