fix two variable declaration issues