Wrapped filter() calls with list() to restore previous functionality. This is backwards-compatible with Python 2.