Fixed leverage sort bug