fexed wrong variable access