Remove unnecessary variable mask_key, use args.mask_key instead. Fix small bug: if filt != args.filter