Filtering attributes for export works

See code comments how to do it