fix filter to filter arrays