Thank you for pointing that out! I didn't see that coming.
Simpler solution, it should fix the issue (all the rest remains the same). I've also simulated the swithing on of power supply.
Better?