Fix warning about setDelegate