Fix warnings during refactoring