fix dead store to local variable