Refactored some facet aware code lines to prevent bugs
Merge branch 'hotfix/facets_as_array'