Fixed fatal error when using filters/sorting but no products were found (#797)