fix stack computations for lmap