fixed the sort computation in KItem and AddInjection pass