Line collision formula fix