added vehicle checks and fixed some bugs