fix call stack overflow caused by sorting the row collection every time an element is added during the initialization