fix delegate

fix delegate function