sorted bug highlighted by test failure