Fixed compilation issues

Fixed segment fault in GetUsedVar