Updated to use weak instead of unsafe_unretained.