fix bug in ll stack handling