converting dep refs to weak refs