Fix example for adding detector using a callable.