Bug fix when sometimes filtering related resources.