Fixed refactor problem