Fixed error with class order in output