Fix unrefactored code