Fixed bug that caused automation_mode to be ignored (and always on).