Fix variable referenced before assignment.