fix ordering of tasks for dependency resolution