Bugfixes so more collisions are detected