Avoids deprecation by using the :handlers option.