Fix sample broken after refactoring