Fix regression while refactoring patch