Added support for last result with $ variable.