Minor refactoring
Fix regression by f512454