Changed to support when $ is not a globally defined function. REOL-11