fix bugs for filtering notes by visibilities