Fix of Firefox's IndexSizeError