bug with array error