fix bug: output random K items, not all