Some fixes/safeguards to our simulation plugin.