Corrected nexted variables implementation