fix tests on 5.10 and 5.8