Fix variable init issue