Fixed refactoring issue