fixed various order output issues