bug fixes in automatic array extension