Fixed refactor error