Fixing some ordering issues