early stopping fixes