Fixed possible IndexSizeError