fix compatibility with 3.12.1