Fix filterPublishedNodes method.