Fixed insertion-sort correctness bug