Attempting to resolve bug related to edited orders not getting the right index