Next time it happens try starting the car in neutral. It sounds like your shift linkage is a llttle out of adjustment not letting the neutral saftey switch to work.