fix tutorial and logic for empty collection