Fixed compilation issue with setDelegate