Changes in definition of lgen_aux function.