Fix issue with refactor