Fix delegate bug