fix ordering problem