Liquid error: undefined method `each_with_index' for nil:NilClass