@User Yes it is working fine now. Thanks for resolving the issue.
But it is taking almost 2 minutes for simulating an inverter. I guess it may take longer if we simulate a circuit like a folded cascode amplifier or even bigger circuits like PLL. May be it depends on system configuration. But with this fix , it is not going into never-ending simulation. Thank you so much. Best Regards.