Fixing AZ max.order issue