fixed type inferenec for delegate