Missed line of code in refactoring