Fix a bug preventing the unit test to run