FIX more bugs with 1d array