Updates and fix the tests