The problem is that rows are deleted and inserted again as more servers get their ping results, which makes the sort function get different results.
It could be fixed by editing the rows instead of re-creating and not sorting the list again after getting ping results if it's not being sorted by ping.