fixed inventory id sort