Fix to collection filtering code.