fix a bug in mappings_filter and add some more features