fix ordering issues