Small refactoring, one test case is failing :/