Fix failing tests (WIP)