Fixing Issue #2 with sorting by row id problem