debug fixes to offline-prep