fixed data-method.
Fixes #2921
better fix [skip ci]