Messed up the array slicing