Fix failing tests that was not testing correctly