fix ordering of resources