fix crash on delegate