[bug fix] don't reset delegate when canHaveDelegate == false
rename canHaveDelegate -> canSetDelegate