fix a couple collection related bugs
causing cores in crawlbot.