Better filtering in mapper