method sorting bug fix.