Made collision detection better