Issue #141: Some fixes to online training, both for flat and freeform