fixing an ordering issue