Smarter collision detection