Duplicate order fix, additional changes