removing unnescessary use of weakptr:s