correcting order of dependecies