Fix failing unit tests (Fix #2426)