Fix error on Windows/Mac introduced by refactoring