fix delegate bug