If you bought it from a dealer, it is their responsibility to repair the car. However, it is a shame they didn't ensure the car was right before you collected it.