fixing bug with local variable