Improved collision testing