Fix to local variable not being declared