Sort packages after parsing