filter + map replaced by collect
(cherry picked from commit f80c858)