Do collision test first