return correct variable in setDataInputToArray

I'm not entirely sure if this works as I think it does, but value
isn't defined and raises an error in one of my cases.