Group Ordering Fix

Tested it in alot of scenarios, working well.