Fix Cannot use a scalar value as an array