Fixed issue with rows getting out of order