replace unsafe_unretained for weak delegate reference