I think it would be better to start the `weak` count at one and then change the check below to look for `weak == 1`.