fixed the array error