fixed the ordering issue