Fix for disabled run on document switch.