Took me a while but I found the solution to my problem described below.
With side stand up (safety switched engaged) never had a problem.
With side stand down (switch disengaged) and in neutral (switch engaged), sometimes the bike would be hard starting and sometimes while running it would stall. Another thing I noticed was, that some times when it was hard to start and after cranking a little while, it would start the moment I took my finger off the starter switch.
The problem was the neutral safety switch.
The switch works by supplying ground to 3 places.
The indicator light, starter solenoid and ignitor.
Apparently some times the ground supplied by the switch was good enough to make the light and starter work properly, but not the ignitor. Remember the light and starter systems are simple circuits, but the ignitor is a digital type igniter and is affected by low voltage.
I have an older post about this problem that you may want to read. But wanted to put it in a new post with the hope anyone with a similar problem would have an easier time finding it.