Issue 7829 by tj: Added middleware autostart