fixed some weirdness with the array