Fixed some ordering issues.