fixing stupid bug with array extension