Fixed some ordering issues