fixed the ordering

Without the right attribute, the result is always 0. that messes up the ordering.