It may be that nerves made it worse on the second time. If you're a confident driver, it might have thrown you a bit by failing first time, and so you tried harder the second time which meant putting extra pressure on yourself. Just keep practising as much as you can (if you have your own car, try driving to the shops and parking one night, then on a dual carriageway the next night, etc.) and concentrate on what the minors were. Majors are obviously a big deal but can often be down to nerves.