Fixed an issue with the refactoring