Fixed a compatibility issue with filter() that changed in a recent
python3 build