Fix failing unit tests