Roto: fix bugs with weak ptrs