Fixed error in arrayresize()