Fix: bug with refactoring