fix compatibility with wrap