Fix deleting the last element in array (fix #346)