fix filter bug with :to and :from.