fix auto delegate issue