Made collision detection better.