Fixing bug where wrong array is being referenced when pushing filtered files