Fix after big refactoring