fix duplicate local variable setting in cli