Fix variables logic.
More fixes to variables parsing.