add decorator in order to avoid new api trouble

Fixes issue #4401