some fixes about setting inverse variable