Fix unit tests on version 3.9