Fixed error in query chain filter